! These routines are obsolete and should be replaced by the operator  .mono.
! They originally overloaded Berz's DAVAR and should be avoided

program example
use polymorphic_complextaylor
implicit none 
integer no,nv,i,ii
type(taylor) f
real(dp) r0, r(2)

no=4; nv= 2;    ! no: the order of the polynomial    nv: the number of variables   
call init(no,nv)  ! initializes taylor series without maps

call alloc(f)      ! must be constructed after init

! creates f=3.d0 + (one.mono.i)
i=1
f=3.d0.var.i    ! Creates 3.d0 + x_1

call print(f,6)


! creates f=r(1) + (r(2).mono.2)
r(1)=5.d0 ; 
r(2)=6.d0
f=r.var.2     ! Creates 5.d0 + (6.d0 x_2)

call print(f,6)


call kill(f)      ! must be destroyed
end program example